// Decompiled by Jad v1.5.8g. Copyright 2001 Pavel Kouznetsov.
// Jad home page: http://www.kpdus.com/jad.html
// Decompiler options: packimports(3) 

package com.nnee.p_pr.p_activity;

import android.app.Dialog;
import android.content.Context;
import android.content.Intent;
import android.os.Bundle;
import android.text.Editable;
import android.text.TextUtils;
import android.view.KeyEvent;
import android.view.View;
import android.view.inputmethod.InputMethodManager;
import android.widget.Button;
import android.widget.CheckBox;
import android.widget.EditText;
import android.widget.ImageView;
import android.widget.LinearLayout;
import android.widget.ProgressBar;
import android.widget.RatingBar;
import android.widget.TextView;
import com.nnee.p_fk.cls_ActivityEx;
import com.nnee.p_fk.cls_k;
import com.nnee.p_pr.a.a;
import com.nnee.p_pr.p_a.cls_h;
import com.nnee.p_pr.p_activity.a.ak;
import com.nnee.p_pr.p_activity.p_view.ListViewEx;
import com.nnee.p_pr.p_app.cls_PrisApp;
import com.nnee.p_pr.p_atom.cls_g;
import com.nnee.p_pr.p_atom.cls_u;
import com.nnee.p_pr.cls_b;
import com.nnee.p_pr.p_c.cls_c;
import com.nnee.p_pr.p_prot.cls_d;
import com.nnee.p_pr.cls_v;
import java.util.LinkedList;

// Referenced classes of package com.nnee.p_pr.p_activity:
//            dr, dq, dp, dt, 
//            dn, do, ds, dk, 
//            dl

public class cls_SubsInfoActivity extends cls_ActivityEx
{

    public cls_SubsInfoActivity()
    {
        h = false;
        i = false;
        j = false;
        k = false;
        l = false;
        m = 0;
        n = 0;
        p = null;
        q = null;
        r = null;
        s = null;
        w = null;
        x = null;
        y = null;
        A = null;
        B = null;
        C = null;
        D = null;
        E = null;
        F = null;
        G = null;
        H = null;
        I = null;
        J = null;
        K = null;
        L = null;
        M = null;
        N = null;
        O = null;
        P = null;
        d = new dr(this);
        e = new dq(this);
        X = new dp(this);
        f = new dt(this);
    }

    static EditText a(SubsInfoActivity subsinfoactivity)
    {
        return cls_SubsInfoActivity.D;
    }

    static String a(SubsInfoActivity subsinfoactivity, String s1)
    {
        cls_SubsInfoActivity.p = s1;
        return s1;
    }

    private void a(int i1, Object obj, String s1, String s2)
    {
        i1;
        JVM INSTR lookupswitch 6: default 60
    //                   302: 61
    //                   303: 97
    //                   304: 114
    //                   800: 128
    //                   801: 160
    //                   804: 144;
           goto _L1 _L2 _L3 _L4 _L5 _L6 _L7
_L6:
        break MISSING_BLOCK_LABEL_160;
_L1:
        return;
_L2:
        m = com.nnee.p_pr.cls_v.a().a((u)obj);
_L8:
        t.add(new Integer(m));
        if(true) goto _L1; else goto _L3
_L3:
        m = com.nnee.p_pr.cls_v.a().b((u)obj);
          goto _L8
_L4:
        m = com.nnee.p_pr.cls_v.a().a(s1);
          goto _L8
_L5:
        m = com.nnee.p_pr.cls_v.a().a(s1, s2);
          goto _L8
_L7:
        m = com.nnee.p_pr.cls_v.a().b(s1, s2);
          goto _L8
        m = com.nnee.p_pr.cls_v.a().a((String)obj, s1, s2);
          goto _L8
    }

    public static void a(Context context, cls_u u1)
    {
        a(context, u1, false);
    }

    public static void a(Context context, cls_u u1, boolean flag)
    {
        cls_PrisApp.a().a(u1);
        Intent intent = new Intent(context, com/netease/pris/activity/SubsInfoActivity);
        intent.putExtra("comment", flag);
        context.startActivity(intent);
    }

    static void a(SubsInfoActivity subsinfoactivity, int i1, Object obj, String s1, String s2)
    {
        cls_SubsInfoActivity.a(i1, obj, s1, s2);
    }

    static void a(SubsInfoActivity subsinfoactivity, cls_d d1)
    {
        cls_SubsInfoActivity.a(d1);
    }

    static void a(SubsInfoActivity subsinfoactivity, cls_d d1, boolean flag)
    {
        cls_SubsInfoActivity.a(d1, flag);
    }

    private void a(cls_d d1)
    {
        if(d1.h.size() > 0)
            R.setVisibility(0);
        else
            R.setVisibility(8);
        v.a();
        v.a(d1.h);
        break MISSING_BLOCK_LABEL_62;
        NullPointerException nullpointerexception;
        nullpointerexception;
        nullpointerexception.printStackTrace();
        break MISSING_BLOCK_LABEL_62;
        Exception exception;
        exception;
        throw exception;
    }

    private void a(cls_d d1, boolean flag)
    {
        if(d1.h.size() > 0)
            Q.setVisibility(0);
        if(flag)
        {
            u.b(d1.h);
        } else
        {
            u.a();
            u.a(d1.h);
        }
        b();
        break MISSING_BLOCK_LABEL_74;
        NullPointerException nullpointerexception;
        nullpointerexception;
        nullpointerexception.printStackTrace();
        break MISSING_BLOCK_LABEL_74;
        Exception exception;
        exception;
        throw exception;
    }

    static boolean a(SubsInfoActivity subsinfoactivity, boolean flag)
    {
        cls_SubsInfoActivity.h = flag;
        return flag;
    }

    static void b(SubsInfoActivity subsinfoactivity)
    {
        cls_SubsInfoActivity.w();
    }

    static boolean b(SubsInfoActivity subsinfoactivity, boolean flag)
    {
        cls_SubsInfoActivity.l = flag;
        return flag;
    }

    private void c()
    {
        android.app.AlertDialog.Builder builder = new android.app.AlertDialog.Builder(this);
        builder.setIcon(0x7f020087);
        builder.setTitle(0x7f0a00b8);
        builder.setMessage(0x7f0a00b9);
        builder.setPositiveButton(0x7f0a00ba, new dn(this));
        builder.setNegativeButton(0x1040000, new do(this));
        builder.show();
    }

    static boolean c(SubsInfoActivity subsinfoactivity)
    {
        return cls_SubsInfoActivity.k;
    }

    static boolean c(SubsInfoActivity subsinfoactivity, boolean flag)
    {
        cls_SubsInfoActivity.i = flag;
        return flag;
    }

    static cls_u d(SubsInfoActivity subsinfoactivity)
    {
        return cls_SubsInfoActivity.q;
    }

    static boolean d(SubsInfoActivity subsinfoactivity, boolean flag)
    {
        cls_SubsInfoActivity.j = flag;
        return flag;
    }

    static ImageView e(SubsInfoActivity subsinfoactivity)
    {
        return cls_SubsInfoActivity.x;
    }

    private void e()
    {
        G = (ImageView)findViewById(0x7f0d0008);
        x = (ImageView)findViewById(0x7f0d00e1);
        y = (TextView)findViewById(0x7f0d00e4);
        z = (ProgressBar)findViewById(0x7f0d000c);
        A = (TextView)findViewById(0x7f0d00e7);
        B = (TextView)findViewById(0x7f0d00e8);
        C = (TextView)findViewById(0x7f0d00cb);
        E = (RatingBar)findViewById(0x7f0d00e6);
        H = (Button)findViewById(0x7f0d00e9);
        I = (Button)findViewById(0x7f0d00ea);
        O = (LinearLayout)findViewById(0x7f0d00d3);
        F = (RatingBar)findViewById(0x7f0d00d4);
        D = (EditText)findViewById(0x7f0d00d5);
        K = (Button)findViewById(0x7f0d00d6);
        L = (Button)findViewById(0x7f0d00d7);
        N = (CheckBox)findViewById(0x7f0d00c9);
        P = (LinearLayout)findViewById(0x7f0d00c8);
        Q = (LinearLayout)findViewById(0x7f0d00cc);
        R = (LinearLayout)findViewById(0x7f0d00d0);
        S = (ListViewEx)findViewById(0x7f0d00ce);
        T = (ListViewEx)findViewById(0x7f0d00d2);
        J = (Button)findViewById(0x7f0d00cf);
        U = (TextView)findViewById(0x7f0d00ca);
        V = (TextView)findViewById(0x7f0d00cd);
        W = (TextView)findViewById(0x7f0d00d1);
        int i1 = com.nnee.p_fk.cls_k.a(this).c(0x7f0800d6);
        if(com.nnee.p_fk.cls_k.a(this).c())
        {
            U.setShadowLayer(0.5F, 0F, 2F, i1);
            V.setShadowLayer(0.5F, 0F, 2F, i1);
            W.setShadowLayer(0.5F, 0F, 2F, i1);
        } else
        {
            U.setShadowLayer(0.5F, 0F, 2F, i1);
            V.setShadowLayer(0.5F, 0F, 2F, i1);
            W.setShadowLayer(0.5F, 0F, 2F, i1);
        }
    }

    private void f()
    {
        if(q != null)
            setTitle(q.U());
        g(8);
    }

    static void f(SubsInfoActivity subsinfoactivity)
    {
        cls_SubsInfoActivity.v();
    }

    private void g()
    {
        if(u == null)
        {
            u = new com.nnee.p_pr.p_activity.a.v(w);
            u.a(r);
        }
        if(S != null)
            S.setAdapter(u);
        if(v == null)
        {
            v = new cls_ak(w);
            v.a(s);
        }
        if(T != null)
            T.setAdapter(v);
    }

    static boolean g(SubsInfoActivity subsinfoactivity)
    {
        return cls_SubsInfoActivity.x();
    }

    static RatingBar h(SubsInfoActivity subsinfoactivity)
    {
        return cls_SubsInfoActivity.F;
    }

    private void h()
    {
        if(G != null)
            G.setOnClickListener(d);
        if(H != null)
            H.setOnClickListener(d);
        if(I != null)
            I.setOnClickListener(d);
        if(J != null)
            J.setOnClickListener(d);
        if(F != null)
            F.setOnTouchListener(e);
        if(K != null)
            K.setOnClickListener(d);
        if(L != null)
            L.setOnClickListener(d);
        if(N != null)
            N.setOnClickListener(d);
        if(T != null)
            T.setOnItemClickListener(X);
    }

    static boolean i(SubsInfoActivity subsinfoactivity)
    {
        return cls_SubsInfoActivity.l;
    }

    static void j(SubsInfoActivity subsinfoactivity)
    {
        cls_SubsInfoActivity.t();
    }

    static acls_k k(SubsInfoActivity subsinfoactivity)
    {
        return cls_SubsInfoActivity.v;
    }

    static LinkedList l(SubsInfoActivity subsinfoactivity)
    {
        return cls_SubsInfoActivity.t;
    }

    static Context m(SubsInfoActivity subsinfoactivity)
    {
        return cls_SubsInfoActivity.w;
    }

    static Button n(SubsInfoActivity subsinfoactivity)
    {
        return cls_SubsInfoActivity.I;
    }

    static LinearLayout o(SubsInfoActivity subsinfoactivity)
    {
        return cls_SubsInfoActivity.P;
    }

    static Button p(SubsInfoActivity subsinfoactivity)
    {
        return cls_SubsInfoActivity.H;
    }

    static int q(SubsInfoActivity subsinfoactivity)
    {
        return cls_SubsInfoActivity.m;
    }

    static int r(SubsInfoActivity subsinfoactivity)
    {
        int i1 = cls_SubsInfoActivity.n;
        cls_SubsInfoActivity.n = i1 + -1;
        return i1;
    }

    private void r()
    {
        cls_u u1 = q;
        if(u1 != null) goto _L2; else goto _L1
_L1:
        return;
_L2:
        String s1 = u1.b(g.g);
        if(s1 == null)
            s1 = u1.b(g.f);
        if(s1 != null && x != null)
        {
            StringBuilder stringbuilder = new StringBuilder();
            x.setTag(stringbuilder);
            com.nnee.p_img.cls_d.a().a(stringbuilder, 0, s1, new ds(this), -1, -1, 2, o);
        }
        String s2 = u1.U();
        if(s2 != null && y != null)
            y.setText(s2);
        if(E != null)
        {
            E.setNumStars(u1.ae());
            E.setRating((float)u1.ah());
        }
        if(A != null)
        {
            int i1 = u1.am();
            String s3;
            TextView textview;
            Object aobj[];
            if(i1 <= 0)
                i1 = 0;
            textview = A;
            aobj = new Object[1];
            aobj[0] = Integer.valueOf(i1);
            textview.setText(getString(0x7f0a00ae, aobj));
        }
        if(B != null)
            B.setText(u1.ai());
        if(H != null)
            if(u1.ak())
            {
                H.setVisibility(0);
                P.setVisibility(8);
                H.setText(0x7f0a0057);
                H.setCompoundDrawablesWithIntrinsicBounds(0x7f02002c, 0, 0, 0);
            } else
            if(u1.al())
            {
                H.setVisibility(0);
                P.setVisibility(8);
                H.setText(0x7f0a0075);
                H.setCompoundDrawablesWithIntrinsicBounds(0x7f02002b, 0, 0, 0);
            } else
            {
                P.setVisibility(8);
                H.setVisibility(8);
            }
        if(I != null)
            if(u1.L() && u1.ak())
            {
                I.setVisibility(0);
                I.setText(0x7f0a00a7);
                I.setCompoundDrawablesWithIntrinsicBounds(0x7f02002d, 0, 0, 0);
            } else
            {
                I.setVisibility(8);
            }
        s3 = u1.W();
        if(s3 == null || s3.trim().length() == 0)
            s3 = w.getString(0x7f0a00af);
        if(C != null)
            C.setText(s3);
        u1.b(g.b);
        if(N != null)
            N.setChecked(com.nnee.p_pr.c.c.c(w, com.nnee.p_b.p_a.cls_d.h().c(), u1.V()));
        if(true) goto _L1; else goto _L3
_L3:
    }

    static int s(SubsInfoActivity subsinfoactivity)
    {
        return cls_SubsInfoActivity.n;
    }

    private void s()
    {
        cls_u u1 = q;
        if(u1 != null) goto _L2; else goto _L1
_L1:
        return;
_L2:
        String s1 = u1.b(g.d);
        if(s1 != null)
        {
            l = true;
            b_();
            n = 1 + n;
            a(800, null, s1, u1.V());
        }
          goto _L1
        NullPointerException nullpointerexception;
        nullpointerexception;
        nullpointerexception.printStackTrace();
          goto _L1
        Exception exception;
        exception;
        throw exception;
    }

    static String t(SubsInfoActivity subsinfoactivity)
    {
        return cls_SubsInfoActivity.p;
    }

    private void t()
    {
        cls_u u1 = q;
        if(p != null && u1 != null)
        {
            l = true;
            J.setEnabled(false);
            b_();
            n = 1 + n;
            a(804, null, p, u1.V());
        }
        break MISSING_BLOCK_LABEL_76;
        NullPointerException nullpointerexception;
        nullpointerexception;
        nullpointerexception.printStackTrace();
        break MISSING_BLOCK_LABEL_76;
        Exception exception;
        exception;
        throw exception;
    }

    static Button u(SubsInfoActivity subsinfoactivity)
    {
        return cls_SubsInfoActivity.J;
    }

    private void u()
    {
        cls_u u1 = q;
        if(u1 != null) goto _L2; else goto _L1
_L1:
        return;
_L2:
        String s1 = u1.b(g.G);
        if(s1 != null)
        {
            b_();
            n = 1 + n;
            a(304, null, s1, null);
        }
          goto _L1
        NullPointerException nullpointerexception;
        nullpointerexception;
        nullpointerexception.printStackTrace();
          goto _L1
        Exception exception;
        exception;
        throw exception;
    }

    private void v()
    {
        if(D != null)
        {
            D.setText("");
            D.requestFocus();
            M.showSoftInput(D, 0);
        }
        if(F != null)
            F.setRating(0F);
        if(O != null)
        {
            O.setVisibility(0);
            android.view.animation.Animation animation = com.nnee.p_pr.a.a.e();
            O.startAnimation(animation);
        }
    }

    static boolean v(SubsInfoActivity subsinfoactivity)
    {
        return cls_SubsInfoActivity.i;
    }

    private void w()
    {
        if(D != null)
        {
            D.setText("");
            android.os.IBinder ibinder = D.getWindowToken();
            M.hideSoftInputFromWindow(ibinder, 0);
        }
        if(O != null)
        {
            O.setVisibility(8);
            android.view.animation.Animation animation = com.nnee.p_pr.a.a.g();
            O.startAnimation(animation);
        }
    }

    static boolean w(SubsInfoActivity subsinfoactivity)
    {
        return cls_SubsInfoActivity.j;
    }

    static void x(SubsInfoActivity subsinfoactivity)
    {
        cls_SubsInfoActivity.s();
    }

    private boolean x()
    {
        boolean flag;
        cls_u u1;
        flag = false;
        u1 = q;
        break MISSING_BLOCK_LABEL_7;
        while(true) 
        {
            do
                return flag;
            while(u1 == null || !u1.L());
            if(F == null || 0F == F.getRating())
                com.nnee.p_pr.p_a.cls_h.a(w, 0x7f0a00b1);
            else
            if(D != null)
            {
                String s1 = D.getEditableText().toString();
                if(TextUtils.isEmpty(s1.trim()))
                {
                    com.nnee.p_pr.p_a.cls_h.a(w, 0x7f0a00b2);
                } else
                {
                    if(!TextUtils.isEmpty(u1.ac()))
                        a(801, u1.ac(), u1.V(), s1);
                    else
                        com.nnee.p_pr.p_a.cls_h.a(w, 0x7f0a00b3);
                    if(!TextUtils.isEmpty(u1.ad()))
                    {
                        m = com.nnee.p_pr.cls_v.a().a(u1.ad(), u1.V(), "", (float)Math.ceil(F.getRating()));
                        t.add(new Integer(m));
                    } else
                    {
                        com.nnee.p_pr.p_a.cls_h.a(w, 0x7f0a00b4);
                    }
                    flag = true;
                }
            }
        }
    }

    public void a(View view)
    {
        if((view instanceof cls_CheckBox) && q != null)
            com.nnee.p_pr.p_c.cls_c.a(w, com.nnee.p_b.p_a.cls_d.h().c(), q.V(), ((CheckBox)view).isChecked());
    }

    public void b()
    {
        g(0);
        z.setVisibility(8);
    }

    public void b_()
    {
        g(8);
        z.setVisibility(0);
    }

    public void onCreate(Bundle bundle)
    {
        super.onCreate(bundle);
        setContentView(0x7f03003d);
        w = this;
        o = com.nnee.p_b.p_a.cls_d.f();
        com.nnee.p_pr.cls_v.a().a(f);
        q = cls_PrisApp.a().q();
        q = com.nnee.p_pr.p_c.cls_c.b(w, com.nnee.p_b.p_a.cls_d.h().c(), q);
        Intent intent = getIntent();
        if(intent != null)
            k = intent.getBooleanExtra("comment", false);
        t = new LinkedList();
        r = new LinkedList();
        s = new LinkedList();
        M = (InputMethodManager)getSystemService("input_method");
        e();
        g();
        h();
        r();
        s();
        u();
        f();
        if(k)
        {
            h = true;
            v();
        }
    }

    public Dialog onCreateDialog(int i1)
    {
        Object obj = null;
        i1;
        JVM INSTR tableswitch 2 2: default 20
    //                   2 22;
           goto _L1 _L2
_L1:
        return ((Dialog) (obj));
_L2:
        android.app.AlertDialog.Builder builder = new android.app.AlertDialog.Builder(this);
        builder.setIcon(0x7f020087);
        builder.setTitle(0x7f0a0057);
        builder.setMessage(0x7f0a0058);
        builder.setPositiveButton(0x7f0a0059, new dk(this));
        builder.setNegativeButton(0x7f0a005a, new dl(this));
        obj = builder.create();
        if(true) goto _L1; else goto _L3
_L3:
    }

    public void onDestroy()
    {
        super.onDestroy();
        com.nnee.p_pr.cls_v.a().b(f);
        com.nnee.p_pr.cls_v.a().a(o);
        if(t != null)
            t.clear();
        if(r != null)
            r.clear();
        if(s != null)
            s.clear();
        q = null;
        x = null;
        y = null;
        A = null;
        B = null;
        C = null;
        D = null;
        E = null;
        F = null;
        G = null;
        H = null;
        I = null;
        J = null;
        K = null;
        L = null;
        O = null;
        N = null;
        P = null;
        Q = null;
        S = null;
        T = null;
        d = null;
        e = null;
        w = null;
    }

    public boolean onKeyDown(int i1, KeyEvent keyevent)
    {
        boolean flag;
        boolean flag1;
        flag = false;
        flag1 = true;
        break MISSING_BLOCK_LABEL_5;
        if(4 == i1 && h)
            if(D.getText().length() > 0)
            {
                c();
                flag = flag1;
            } else
            {
                w();
                h = flag;
                if(!k)
                    flag = flag1;
                else
                    com.nnee.p_pr.p_d.cls_c.a(p(), 1601, q.U());
            }
        if(!flag)
            flag1 = super.onKeyDown(i1, keyevent);
        return flag1;
    }

    public void onPause()
    {
        super.onPause();
    }

    public void onPrepareDialog(int i1, Dialog dialog)
    {
        switch(i1)
        {
        case 2: // '\002'
        default:
            return;
        }
    }

    public void onResume()
    {
        super.onResume();
    }

    public static final int a = 2;
    public static final int b = 0;
    public static final int c = 1;
    private static final String g = "comment";
    private TextView A;
    private TextView B;
    private TextView C;
    private EditText D;
    private RatingBar E;
    private RatingBar F;
    private ImageView G;
    private Button H;
    private Button I;
    private Button J;
    private Button K;
    private Button L;
    private InputMethodManager M;
    private CheckBox N;
    private LinearLayout O;
    private LinearLayout P;
    private LinearLayout Q;
    private LinearLayout R;
    private ListViewEx S;
    private ListViewEx T;
    private TextView U;
    private TextView V;
    private TextView W;
    private android.widget.AdapterView.OnItemClickListener X;
    android.view.View.OnClickListener d;
    android.view.View.OnTouchListener e;
    b f;
    private boolean h;
    private boolean i;
    private boolean j;
    private boolean k;
    private boolean l;
    private int m;
    private int n;
    private int o;
    private String p;
    private u q;
    private LinkedList r;
    private LinkedList s;
    private LinkedList t;
    private com.nnee.p_pr.p_activity.a.v u;
    private ak v;
    private Context w;
    private ImageView x;
    private TextView y;
    private ProgressBar z;
}
